import { Injectable } from '@nestjs/common';
import { RedisService } from './redis/redis.service';

@Injectable()
export class AppService {
  constructor(private readonly redisService: RedisService) { }

  async getHello(): Promise<string> {
    const client = this.redisService.getClient();
    await client.set('test_key', 'Hello, Redis!');
    const value = await client.get('test_key');
    return (value || ""); // 应返回 "Hello, Redis!"
  }
}